home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / disk / acdplay / install-acdplay < prev    next >
Text File  |  1996-12-23  |  12KB  |  407 lines

  1. ;===========================================================================;
  2. ;
  3. ;                    Installer script for ACDPlay V1.0
  4. ;                            by Martin Kresse
  5. ;                        translated by Marc Altmann
  6. ;
  7. ;                   $VER: Install_ACDPlay 1.0 (22.12.96)
  8. ;
  9. ;===========================================================================;
  10.  
  11. (if (= @language "deutsch")
  12.   (
  13.     (set #welcome
  14.         (cat "Willkommen zur Installation von\nACDPlay\n"
  15.              "einem CDDA Player für SCSI CD-ROM Laufwerke.")
  16.     )
  17.  
  18.     (set #acdpdir-prompt
  19.         (cat "In welches Verzeichnis soll ACDPlay installiert werden?\n"
  20.              "(es wird ein Verzeichnis mit dem Namen \"ACDPlay\" angelegt)")
  21.     )
  22.     (set #acdpdir-help
  23.         (cat "Sie können jetzt ein Verzeichnis wählen in dem eine eigene "
  24.              "Schublade mit dem Namen \"ACDPlay\" erstellt wird. Dahin "
  25.              "wird ACDPlay mit allen dazugehörigen Dateien kopiert.\n\n"
  26.              @askdir-help)
  27.     )
  28.  
  29.     (set #components-prompt
  30.         (cat "Welche Komponenten von ACDPlay möchten Sie installieren?")
  31.     )
  32.     (set #components-help
  33.         (cat "Sie können jetzt die einzelnen Komponenten des ACDPlay-Pakets "
  34.              "die sie installieren möchten auswählen. Für eine normale "
  35.              "Installation sollten alle Punkte angewählt sein.\n\n"
  36.              @askoptions-help)
  37.     )
  38.     (set #components-main "Hauptprogramm")
  39.     (set #components-docs "Dokumentation")
  40.     (set #components-cats "Katalogdateien")
  41.     (set #components-rexx "ARexx Beispiele")
  42.     (set #components-cdid "Titeldateien")
  43.  
  44.     (set #abort "Keine Komponenten gewählt: Installation abgebrochen")
  45.  
  46.     (set #magicwb-prompt "Sollen MagicWB-Icons benutzt werden?")
  47.     (set #magicwb-help
  48.         (cat "Falls sie das MagicWB-Paket von Martin Huttenloher auf ihrem "
  49.              "Rechner installiert haben, sollten sie auch die MWB-Icons von "
  50.              "ACDPlay benutzen. Wenn Sie den Begriff MagicWB allerdings "
  51.              "zum ersten mal hören, sollten Sie lieber die Standard-Icons "
  52.              "installieren, um eine 'klare Sicht' zu gewährleisten.")
  53.     )
  54.  
  55.     (set #catalogs-prompt
  56.         (cat "Für welche Sprache sollen Kataloge und Anleitung kopiert "
  57.              "werden?")
  58.     )
  59.     (set #catalogs-help
  60.         (cat "Jetzt können Sie die Sprache wählen, in der ACDPlay und die "
  61.              "Dokumentation erscheinen soll. Wird ihre Heimatsprache nicht "
  62.              "unterstützt, wenden Sie sich bitte an die Programmierer\n\n"
  63.              "Achtung: Damit ACDPlay die verschiedenen Sprachen nutzen "
  64.              "kann, muß die locale.library existieren, welche erst ab "
  65.              "Workbench 2.1 zum Betriebssystem gehört. Unter älteren "
  66.              "Versionen erscheint ACDPlay immer in englisch.\n\n"
  67.              @askchoice-help)
  68.     )
  69.     (set #catalogs-german  "Deutsch")
  70.     (set #catalogs-english "Englisch")
  71.     (set #catalogs-default 0)
  72.  
  73.     (set #getdev-prompt "Erkunde ihr SCSI-Device...")
  74.  
  75.     (set #devicename-prompt "Geben sie den Namen ihres SCSI-Devices ein:")
  76.     (set #devicename-help
  77.         (cat "Damit ACDPlay ihr CD-ROM-Laufwerk ansteuern kann, muß der "
  78.              "Name des SCSI-Gerätetreibers bekannt sein. Da dieser aufgrund "
  79.              "verschiedenster Konfigurationen auf jedem System "
  80.              "unterschiedlich sein kann, ist es schwer, diesen mit "
  81.              "hudertprozentiger Sicherheit festzustellen. Bitte "
  82.              "vergewissern Sie sich im Handbuch ihres SCSI-Hostadapters, ob "
  83.              "der hier 'erratene' Name richtig ist.\n\n"
  84.              @askstring-help)
  85.     )
  86.  
  87.     (set #getunit-prompt "Suche CD-ROM Laufwerk...")
  88.  
  89.     (set #deviceunit-prompt
  90.         (cat "Geben Sie die Unit ihres CD-ROM-Laufwerkes ein:")
  91.     )
  92.     (set #deviceunit-help
  93.         (cat "Da ein SCSI-Hostadapter bis zu sieben Geräte ansteuern kann, "
  94.              "muß jedes angeschlossene Gerät durch eine Nummer (0-7) "
  95.              "identifiziert werden. Sollte ACDPlay mit der hier "
  96.              "vorgegebenen Nummer nicht funktionieren, können Sie ruhig "
  97.              "alle ausprobieren, bis es funktioniert.\n\n"
  98.              @asknumber-help)
  99.     )
  100.  
  101.     (set #copycdlib-prompt "Kopiere 'cdplay.library' nach LIBS:")
  102.     (set #copycdlib-help
  103.         (cat "Die 'cdplay.library' von Patrick Hess wird von ACDPlay "
  104.              "unbedingt benötigt. Damit sie gefunden und benutzt werden "
  105.              "kann, muß sie sich im logischen Laufwerk LIBS: befinden.\n\n"
  106.              @copylib-help)
  107.     )
  108.   )
  109.   (
  110.     (set #welcome
  111.         (cat "Welcome to the installation of\nACDPlay\n"
  112.              "a CDDA player for SCSI CD-ROM drives.")
  113.     )
  114.  
  115.     (set #acdpdir-prompt
  116.         (cat "In which directory do you want to install ACDPlay?\n"
  117.              "(a drawer named \"ACDPlay\" will be created)")
  118.     )
  119.     (set #acdpdir-help
  120.         (cat "You may now choose a directory in which an own drawer "
  121.              "drawer named \"ACDPlay\" will be created. ACDPlay will be "
  122.              "copied to the resulting path with all files belonging to it.\n\n"
  123.              @askdir-help)
  124.     )
  125.  
  126.     (set #components-prompt
  127.         (cat "Which of ACDPlay's components do you want to install?")
  128.     )
  129.     (set #components-help
  130.         (cat "You may now select the individual components of the ACDPlay "
  131.              "package you want to install. All items should be selected for "
  132.              "a normal installation.\n\n"
  133.              @askoptions-help)
  134.     )
  135.     (set #components-main "main program")
  136.     (set #components-docs "documentation")
  137.     (set #components-cats "catalogs")
  138.     (set #components-rexx "ARexx examples")
  139.     (set #components-cdid "title files")
  140.  
  141.     (set #abort "No component chosen: installation aborted")
  142.  
  143.     (set #magicwb-prompt "Do you prefer MagicWB icons?")
  144.     (set #magicwb-help
  145.         (cat "If you have Martin Huttenloher's MagicWB package installed "
  146.              "on your machine, you should use ACDPlay's MagicWB icons too. "
  147.              "If it's the first time you hear the term MagicWB, it's a good "
  148.              "idea to install the standard icons to ensure a 'clear sight'.")
  149.     )
  150.  
  151.     (set #catalogs-prompt
  152.         (cat "For what language do you want to install catalogs and documentation?")
  153.     )
  154.     (set #catalogs-help
  155.         (cat "You may now choose the language in which ACDPlay and the documentation "
  156.              "should appear. If your own language isn't supported, please contact one "
  157.              "of the programmers\n\n"
  158.              "Attention: In order to use the different languages ACDPlay needs "
  159.              "locale.library installed which is part of the operating system since "
  160.              "Workbench 2.1. Under older versions of the OS ACDPlay will always"
  161.              "appear in English.\n\n"
  162.              @askchoice-help)
  163.     )
  164.     (set #catalogs-german  "German")
  165.     (set #catalogs-english "English")
  166.     (set #catalogs-default 0)
  167.  
  168.     (set #getdev-prompt "Examining your SCSI device...")
  169.  
  170.     (set #devicename-prompt "Enter the name of your SCSI device:")
  171.     (set #devicename-help
  172.         (cat "In order to send commands to your CD-ROM drive ACDPlay must know "
  173.              "the name of your SCSI device driver. Because this can be different "
  174.              "on each system because of many different configurations it's hard "
  175.              "to determine the right one with 100% safity. "
  176.              "Please make sure with the help of your SCSI host adapters' manual "
  177.              "whether this 'guessed' name is the right one.\n\n"
  178.              @askstring-help)
  179.     )
  180.  
  181.     (set #getunit-prompt "Looking for CD-ROM drive...")
  182.  
  183.     (set #deviceunit-prompt
  184.         (cat "Enter the unit of your CD-ROM drive:")
  185.     )
  186.     (set #deviceunit-help
  187.         (cat "Since a SCSI adapter is able to control up to 7 devices, "
  188.              "each one must be indentified by a number (0-7). "
  189.              "If ACDPlay doesn't work with the proposed number, you may "
  190.              "just try every number until it does.\n\n"
  191.              @asknumber-help)
  192.     )
  193.  
  194.     (set #copycdlib-prompt "Copying 'cdplay.library' to LIBS:")
  195.     (set #copycdlib-help
  196.         (cat "Patrick Hess' 'cdplay.library' is badly needed by ACDPlay "
  197.              "In order to be found and used it must be situated "
  198.              "within the logical device LIBS:.\n\n"
  199.              @copylib-help)
  200.     )
  201.   )
  202. )
  203.  
  204.  
  205. (welcome #welcome)
  206.  
  207. (complete 0)
  208.  
  209. ;---------------------------------------------------------- ask user options
  210.  
  211. (set rootdestdir
  212.     (askdir
  213.         (prompt  #acdpdir-prompt)
  214.         (help    #acdpdir-help)
  215.         (default "Sys:Utilities")
  216.     )
  217. )
  218.  
  219. (set destdir (tackon rootdestdir "ACDPlay"))
  220. (set @default-dest destdir)
  221.  
  222. (set components
  223.     (askoptions
  224.         (prompt #components-prompt)
  225.         (help   #components-help)
  226.         (choices #components-main
  227.                  #components-docs
  228.                  #components-cats
  229.                  #components-rexx
  230.                  #components-cdid)
  231.         (default 31)
  232.     )
  233. )
  234.  
  235. (if (= components 0)
  236.     (exit #abort (quiet))
  237. )
  238.  
  239. (complete 10)
  240.  
  241. (set magicwb
  242.     (askbool
  243.         (prompt #magicwb-prompt)
  244.         (help   #magicwb-help)
  245.         (default 0)
  246.     )
  247. )
  248.  
  249. (set catalogs
  250.     (askchoice
  251.         (prompt #catalogs-prompt)
  252.         (help   #catalogs-help)
  253.         (choices #catalogs-german
  254.                  #catalogs-english)
  255.         (default #catalogs-default)
  256.     )
  257. )
  258.  
  259. (if (= catalogs 0)
  260.   (set language "deutsch")
  261.   (set language "english")
  262. )
  263.  
  264. (complete 20)
  265.  
  266. (run "c/FindDevice >ENV:scsi_device" (prompt #getdev-prompt))
  267.  
  268. (set devicename
  269.     (askstring
  270.         (prompt #devicename-prompt)
  271.         (help   #devicename-help)
  272.         (default (getenv "scsi_device"))
  273.     )
  274. )
  275.  
  276. (run ("c/FindCDROM >ENV:scsi_unit %s" devicename) (prompt #getunit-prompt))
  277.  
  278. (set deviceunit
  279.     (asknumber
  280.         (prompt #deviceunit-prompt)
  281.         (help   #deviceunit-help)
  282.         (range 0 7)
  283.         (default (getenv "scsi_unit"))
  284.     )
  285. )
  286.  
  287. (complete 30)
  288.  
  289.  
  290. ;----------------------------------------- now we can start the installation
  291.  
  292. (makedir destdir)
  293. (copyfiles
  294.     (source "ACDPlay.info")
  295.     (dest   rootdestdir)
  296.     (noposition)
  297. )
  298.  
  299.  
  300. ; copy cdplay.library
  301. ;
  302. (copylib
  303.     (prompt #copycdlib-prompt)
  304.     (help   #copycdlib-help)
  305.     (source "libs/cdplay.library")
  306.     (dest   "LIBS:")
  307.     (confirm)
  308.     (optional oknodelete askuser)
  309. )
  310.  
  311. (complete 50)
  312.  
  313. ; copy and configure main program
  314. ;
  315. (if (IN components 0)
  316.   (
  317.     (copyfiles
  318.         (source "ACDPlay/ACDPlay")
  319.         (dest   destdir)
  320.         (files)
  321.         (infos)
  322.     )
  323.     (if (= magicwb 0)                        ; 4 colour icons?
  324.       (copyfiles
  325.           (source "Icons/ACDPlay.info")
  326.           (dest   destdir)
  327.       )
  328.     )
  329.     (tooltype
  330.         (dest (tackon destdir "ACDPlay"))
  331.         (settooltype "(DEVICE")
  332.         (settooltype "DEVICE" devicename)
  333.         (settooltype "(UNIT")
  334.         (settooltype "UNIT" ("%ld" deviceunit ))
  335.         (noposition)
  336.     )
  337.   )
  338. )
  339.  
  340. ; copy documentation
  341. ;
  342. (if (IN components 1)
  343.   (
  344.     (copyfiles
  345.         (source (tackon "docs" (tackon language "ACDPlay.guide")))
  346.         (dest   destdir)
  347.         (infos)
  348.         (noposition)
  349.     )
  350.     (if (= magicwb 0)                        ; 4 colour icons?
  351.       (copyfiles
  352.           (source "Icons/ACDPlay.guide.info")
  353.           (dest   destdir)
  354.       )
  355.     )
  356.   )
  357. )
  358.  
  359. (complete 60)
  360.  
  361. ; copy catalogs
  362. ;
  363. (if (IN components 2)
  364.   (if (<> language "english")
  365.     (
  366.       (makedir (tackon destdir "catalogs"))
  367.       (copyfiles
  368.           (source (tackon "Catalogs" (tackon language "ACDPlay.catalog")))
  369.           (dest   (tackon destdir (tackon "catalogs" language)))
  370.       )
  371.     )
  372.   )
  373. )
  374.  
  375. (complete 70)
  376.  
  377. ; copy arexx examples
  378. ;
  379. (if (IN components 3)
  380.     (copyfiles
  381.         (source "Arexx")
  382.         (dest   (tackon destdir "ARexx"))
  383.         (all)
  384.     )
  385. )
  386.  
  387. (complete 80)
  388.  
  389. ; copy diskfiles
  390. ;
  391. (if (IN components 4)
  392.     (copyfiles
  393.         (source "Disks")
  394.         (dest   (tackon destdir "Disks"))
  395.         (all)
  396.     )
  397. )
  398.  
  399. ;------------------------------------------------------------------ clean up
  400.  
  401. ; kill these global variables
  402. ;
  403. (delete "ENV:scsi_device" (safe))
  404. (delete "ENV:scsi_unit" (safe))
  405.  
  406. (complete 100)
  407.